package game.remoteService;

import game.ioc.ProductInstance;
import game.remoteService.interfaces.RemoteService;

/**
 * A remote service factory used to build the service implemetation
 * with the specified parameter.
 * 
 * @author Linzy
 * Create Date: 2009 9 4 11:10:24
 * 
 */
public class RemoteServiceFactory {

	/**
	 * Factory method, get a specified remote service implementation 
	 * with the app parameter.
	 * 
	 * @param app String; Remote service name.
	 * @return RemoteService interface;
	 */
	public static RemoteService buildService(String app) {
		if(app == null || app.equals(""))
			return null;
		
		return (RemoteService)ProductInstance.getRServiceInstance(app);
	} // buildService()

	
} // end of class
